#define _CRT_SECURE_NO_WARNINGS 1

class Solution {
public:
    void moveZeroes(vector<int>& nums) {
        int cur = 0;
        int des = -1;
        while (cur < nums.size())
        {
            if (nums[cur])
            {
                ++des;
                swap(nums[des], nums[cur]);
            }
            cur++;
        }

        return;
    }
};